//
//  CommonTools.swift
//  WeiBo
//
//  Created by Apple on 16/9/6.
//  Copyright © 2016年 KY. All rights reserved.
//

import UIKit

//  切换跟视图控制器通知名
let SwitchRootVCNotification = "SwitchRootVCNotification"
//  点击表情发送的通知名
let DidSelectedEmoticonNotification = "DidSelectedEmoticonNotification"


//  获取当前屏幕的宽度
let ScreenWidth = UIScreen.main.bounds.size.width
//  获取当前屏幕的高度
let ScreenHeight = UIScreen.main.bounds.size.height

//  常量的时间格式化对象
let dateFormatter: DateFormatter = {
    let dt = DateFormatter()
    dt.locale = Locale(identifier: "en_US")
    return dt
}()

//  随机颜色
func RandomColor() -> UIColor {
    
    let red = arc4random() % 256
    let green = arc4random() % 256
    let blue = arc4random() % 256
    
    //  需要把类型转CGFloat
    return UIColor(red: CGFloat(red) / 255, green: CGFloat(green) / 255, blue: CGFloat(blue) / 255, alpha: 1)

}
